package fr.umlv.m2.jee.pmlv.persistence.planning;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;


import fr.umlv.m2.jee.pmlv.persistence.subject.AbstractTheme;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@SuppressWarnings("serial")
@Entity
@Table(name="RecordDate")
public class RecordDate implements Serializable {
	@Id
	@GeneratedValue
	@Column(name = "recordDate_id")	
	private long id;

        @Temporal(TemporalType.TIMESTAMP)
	@Column(name = "recordDate_deadLine")	
	private Date deadLine;

	@OneToOne
	@JoinColumn(name="theme_id")
	private AbstractTheme theme;
	
	
	public void setId(long id) {
		this.id = id;
	}
	
	public long getId() {
		return id;
	}
	
	public void setDeadLine(Date deadLine) {
		this.deadLine = deadLine;
	}

	public Date getDeadLine() {
		return deadLine;
	}

	public void setTheme(AbstractTheme theme) {
		this.theme = theme;
	}

	public AbstractTheme getTheme() {
		return theme;
	}
}
